<?php
/* vim: set ts=4 sw=4: */
/*
* @package
* @filename	   LoaderTest.php
* @author	   Garfield <garfield0601@gmail.com>
* @copyright 	
* @version 
* @since  	   2008-7-5 17:19:18
* 
*/

// Call SmartPHP_DbTest::main() if this source file is executed directly.
if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', 'SmartPHP_DbTest::main');
}

require_once 'PHPUnit/Framework.php';
require_once "SmartPHP/Loader.php";

/**
 * Test class for SmartPHP_Db.
 * Generated by PHPUnit on 2008-06-23 at 08:04:32.
 */
class SmartPHP_LoaderTest extends PHPUnit_Framework_TestCase
{
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once 'PHPUnit/TextUI/TestRunner.php';

        $suite  = new PHPUnit_Framework_TestSuite('SmartPHP_DbTest');
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     *
     * @access protected
     */
    protected function setUp()
    {
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     *
     * @access protected
     */
    protected function tearDown()
    {
    }

	public function testLoadClass()
	{
		$class = "SmartPHP_Db_Table";
		SmartPHP_Loader::loadClass($class);
		$this->assertTrue(class_exists($class));
	}
}
